package group6renderer.renderernode;

import group6renderer.Display;

/* ClASS NAME: BreakNode
 * DESCRIPTION: A class to deal with line breaks
 * COLABORATORING CLASSES: LeafNode, Display
 * @author jonnie
 */
public class BreakNode extends LeafNode 
{
    
	/**
	 * A Constructor to initialise the fields of a new BreakNode.
	 */
	public BreakNode(String tag)
    {
	name = tag;
    }

	/** 
     * A method overriding the abstract method in TreeNode. It adjusts the properties of the State class according to the type of node
     * concerned.  
     * @param disp the Display object of the project (there is only one)
     * @Override
     */
    public void drawNode(Display disp)
    {
    	disp.crlf();
    }

    /** 
     * A method to return whether this Node has a closing tag
     * @Override
     * @return true if this node has a closing tag and false otherwise
     */
    public boolean hasClosing()
    {
	  return false;
    }

    /** 
     * A method to return a new copy of this node.
     * @Override
     * @return a new instance of this node with the original name
     */
    public TreeNode copy()
    {
	return new BreakNode(name);
    }


}

